new Promise((resolve, reject) => {
  reject(new Error("abc"));
}).then(null, (err) => {
  console.log(err);
});

new Promise((resolve, reject) => {
  reject(new Error("abc"));
}).catch((err) => {
  console.log(err);
});
